<script lang="ts" setup>
import { isVue2, isVue3, ref } from 'vue-demi'

const versionStr = isVue2 ? 'Vue2' : 'Vue3'
const Vue2Version = ref(versionStr)
const handleCustomEvent= (eventData)=> {
            // 处理从组件中传递过来的数据Token
            console.log("组件传回来的数据token===",eventData)
        }
console.warn(`Vue env: Vue3:${isVue3} -- Vue2: ${isVue2}`)
</script>

<template>
  <div>
    <span>{{ Vue2Version }}</span>
    <TZLogin :commet="46"  @custom-event="handleCustomEvent" />
  </div>
</template>

<style>
body > div {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
